﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace Kators.Services
{
    public class DateTimeService
    {

        public static List<string> GetMonths()
        {
            var americanCulture = new CultureInfo("en-US");
            List<string> months = new List<string>();
            for (int i = 0; i < 12; i++)
            {
                months.Add(americanCulture.DateTimeFormat.AbbreviatedMonthNames[i]);
            }

            return months;
        }

        public static List<int> GetDays()
        {
            List<int> days = new List<int>();
            for (int i = 1; i <= 31; i++)
            {
                days.Add(i);
            }

            return days;
        }

        public static List<int> GetYears(int startYear, int endYear)
        {
            List<int> years = new List<int>();
            for (int i = startYear; i <= endYear; i++)
            {
                years.Add(i);
            }

            return years;
        }

        public static DateTime GetParsedDateTime(string month, string day, string year)
        {
            var sec = DateTime.Now.ToString("HH:mm:ss.fff");
            var temp = DateTime.Now.Ticks;
            string monthDayYear = month+ "-" + day + "-" + year + " " + sec;
            DateTime parsedDateTime = DateTime.Parse(monthDayYear);

            return parsedDateTime;
        }





    }
}
